/*
 * @Author: luoqi
 * @Date: 2022-04-06 10:28:09


 * @LastEditors: Andy
 * @LastEditTime: 2022-04-12 03:23:51

 * @LastEditors: LiuPeng
 * @LastEditTime: 2022-04-07 15:08:41



 * @Description: 
 */
const proxy = require('http-proxy-middleware');
module.exports = function (app) {
  app.use(
    proxy.createProxyMiddleware('/api/dfxt', {
      target: "http://139.155.90.63:8080",
      secure: false,
      changeOrigin: true,
      pathRewrite: {
        "^/api/dfxt": "/dfxt" // 把/api 变成空
      }
    }),
    proxy.createProxyMiddleware('/api', {
      target: "http://139.155.90.63:8080",
      secure: false,
      changeOrigin: true,
      pathRewrite: {
        "^/api": "/" // 把/api 变成空
      }
    })
  )
};

